package com.bnlr.lrparking.model;

import android.os.Parcel;
import android.os.Parcelable;

import com.chad.library.adapter.base.entity.MultiItemEntity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 车位列表实体
 */

public class StallListBean {
    /**
     * errorCode : 0
     * msgcode : 1
     * msg : 成功
     * data : [{"RowNum":1,"Id":57624,"Type":11,"Title":"出售 领城公园1857 13平米","Area":"新郑市","Address":"新郑市龙湖镇双湖大道与求实路交叉口西南","Size":13,"Price":"85000 元","Status":"待售","StatusInt":0,"SpaceOwerType":1,"PhotoUrl":"http://91tcw.cn/upload/201710/24/201710241536599228.jpg ","CreateTime":"2017-10-20 15:50:56","Discount":[{"title":"可分期","textColor":"00CAA3","backColor":"e5faf6"},{"title":"交3000抵10000","textColor":"EA5544","backColor":"fdeeec"},{"title":"狗子朋友免押金","textColor":"EA5544","backColor":"fdeeec"},{"title":"对外销售","textColor":"999999","backColor":"f5f5f5"}]}]
     * recordCount : 7
     */

    private int errorCode;
    private String msgcode;
    private String msg;
    private int recordCount;
    private List<DataBean> data;

    public int getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(int errorCode) {
        this.errorCode = errorCode;
    }

    public String getMsgcode() {
        return msgcode;
    }

    public void setMsgcode(String msgcode) {
        this.msgcode = msgcode;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getRecordCount() {
        return recordCount;
    }

    public void setRecordCount(int recordCount) {
        this.recordCount = recordCount;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean implements Serializable , MultiItemEntity, Parcelable {
        /**
         * RowNum : 1
         * Id : 57624
         * Type : 11
         * Title : 出售 领城公园1857 13平米
         * Area : 新郑市
         * Address : 新郑市龙湖镇双湖大道与求实路交叉口西南
         * Size : 13
         * Price : 85000 元
         * Status : 待售
         * StatusInt : 0
         * SpaceOwerType : 1
         * PhotoUrl : http://91tcw.cn/upload/201710/24/201710241536599228.jpg
         * CreateTime : 2017-10-20 15:50:56
         * Discount : [{"title":"可分期","textColor":"00CAA3","backColor":"e5faf6"},{"title":"交3000抵10000","textColor":"EA5544","backColor":"fdeeec"},{"title":"狗子朋友免押金","textColor":"EA5544","backColor":"fdeeec"},{"title":"对外销售","textColor":"999999","backColor":"f5f5f5"}]
         */

        public static final int CHU_ZU = 10;
        public static final int CHU_SHOU = 11;
        public static final int QIU_ZU = 20;
        public static final int QIU_GOU = 21;
        private int RowNum;
        private int Id;
        private int Type;
        private String Title;
        private String Area;
        private String Address;
        private Double Size;
        private String Price;
        private String Status;
        private int StatusInt;
        private int SpaceOwerType;
        private String PhotoUrl;
        private String CreateTime;
        private String CommonNumber;
        private String Number;

        public String getCommonNumber() {
            return CommonNumber;
        }

        public String getNumber() {
            return Number;
        }

        private List<DiscountBean> Discount;

        public int getRowNum() {
            return RowNum;
        }

        public void setRowNum(int RowNum) {
            this.RowNum = RowNum;
        }

        public int getId() {
            return Id;
        }

        public void setId(int Id) {
            this.Id = Id;
        }

        public int getType() {
            return Type;
        }

        public void setType(int Type) {
            this.Type = Type;
        }

        public String getTitle() {
            return Title;
        }

        public void setTitle(String Title) {
            this.Title = Title;
        }

        public String getArea() {
            return Area;
        }

        public void setArea(String Area) {
            this.Area = Area;
        }

        public String getAddress() {
            return Address;
        }

        public void setAddress(String Address) {
            this.Address = Address;
        }

        public Double getSize() {
            return Size;
        }

        public void setSize(Double Size) {
            this.Size = Size;
        }

        public String getPrice() {
            return Price;
        }

        public void setPrice(String Price) {
            this.Price = Price;
        }

        public String getStatus() {
            return Status;
        }

        public void setStatus(String Status) {
            this.Status = Status;
        }

        public int getStatusInt() {
            return StatusInt;
        }

        public void setStatusInt(int StatusInt) {
            this.StatusInt = StatusInt;
        }

        public int getSpaceOwerType() {
            return SpaceOwerType;
        }

        public void setSpaceOwerType(int SpaceOwerType) {
            this.SpaceOwerType = SpaceOwerType;
        }

        public String getPhotoUrl() {
            return PhotoUrl;
        }

        public void setPhotoUrl(String PhotoUrl) {
            this.PhotoUrl = PhotoUrl;
        }

        public String getCreateTime() {
            return CreateTime;
        }

        public void setCreateTime(String CreateTime) {
            this.CreateTime = CreateTime;
        }

        public List<DiscountBean> getDiscount() {
            return Discount;
        }

        public void setDiscount(List<DiscountBean> Discount) {
            this.Discount = Discount;
        }

        @Override
        public int getItemType() {
            return this.Type;
        }

        public static class DiscountBean {
            /**
             * title : 可分期
             * textColor : 00CAA3
             * backColor : e5faf6
             */

            private String title;
            private String textColor;
            private String backColor;

            public String getTitle() {
                return title;
            }

            public void setTitle(String title) {
                this.title = title;
            }

            public String getTextColor() {
                return textColor;
            }

            public void setTextColor(String textColor) {
                this.textColor = textColor;
            }

            public String getBackColor() {
                return backColor;
            }

            public void setBackColor(String backColor) {
                this.backColor = backColor;
            }
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.RowNum);
            dest.writeInt(this.Id);
            dest.writeInt(this.Type);
            dest.writeString(this.Title);
            dest.writeString(this.Area);
            dest.writeString(this.Address);
            dest.writeValue(this.Size);
            dest.writeString(this.Price);
            dest.writeString(this.Status);
            dest.writeInt(this.StatusInt);
            dest.writeInt(this.SpaceOwerType);
            dest.writeString(this.PhotoUrl);
            dest.writeString(this.CreateTime);
            dest.writeString(this.CommonNumber);
            dest.writeString(this.Number);
            dest.writeList(this.Discount);
        }

        public DataBean() {
        }

        protected DataBean(Parcel in) {
            this.RowNum = in.readInt();
            this.Id = in.readInt();
            this.Type = in.readInt();
            this.Title = in.readString();
            this.Area = in.readString();
            this.Address = in.readString();
            this.Size = (Double) in.readValue(Double.class.getClassLoader());
            this.Price = in.readString();
            this.Status = in.readString();
            this.StatusInt = in.readInt();
            this.SpaceOwerType = in.readInt();
            this.PhotoUrl = in.readString();
            this.CreateTime = in.readString();
            this.CommonNumber = in.readString();
            this.Number = in.readString();
            this.Discount = new ArrayList<DiscountBean>();
            in.readList(this.Discount, DiscountBean.class.getClassLoader());
        }

        public static final Parcelable.Creator<DataBean> CREATOR = new Parcelable.Creator<DataBean>() {
            @Override
            public DataBean createFromParcel(Parcel source) {
                return new DataBean(source);
            }

            @Override
            public DataBean[] newArray(int size) {
                return new DataBean[size];
            }
        };
    }
}
